﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace McsWeb.Models
{
    public class Result<T>
    {
        /// <summary>
        /// 获取或设置 Ajax操作结果类型
        /// </summary>
        public AjaxResultType Type { get; set; }

        /// <summary>
        /// 获取或设置 消息内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 获取或设置 返回数据
        /// </summary>
        public T Data { get; set; }
        public int TotalRows { get; set; }
    }
    public enum AjaxResultType
    {
        /// <summary>
        /// 消息结果类型
        /// </summary>
        Info,

        /// <summary>
        /// 成功结果类型
        /// </summary>
        Success,

        /// <summary>
        /// 警告结果类型
        /// </summary>
        Warning,

        /// <summary>
        /// 异常结果类型
        /// </summary>
        Error
    }

    public class NodeServerModel
    {
        public int ID { get; set; }
        public string IP { get; set; }
        public int Port { get; set; }
    }
    public class ResultModel
    {
        public bool success { get; set; }
        public string message { get; set; }
        public object data { get; set; }
    }
    public class ClientVersion
    {
        public string Ver { get; set; }
        public string Url { get; set; }
        public List<string> NodeSvr { get; set; }
    }
    public class LoginModel
    {
        public int UserID { get; set; }
        public string LoginName { get; set; }
        public string UserName { get; set; }
    }
    public class UsersModel
    {
        public int ID { get; set; }
        public string UserName { get; set; }
        public string Sex { get; set; }
        public string Phone { get; set; }
        public string WeiXin { get; set; }
        public string CardID { get; set; }
        public int MinerNumber { get; set; }
        public int OnLineNumber { get; set; }
        public int DigNumber { get; set; }
        public int StaffID { get; set; }
        public string StaffName { get; set; }
    } 
    public class GridData<T>
    {
        /// <summary>
        /// 获取或设置 行数据
        /// </summary>
        public List<T> rows { get; set; }

        /// <summary>
        /// 获取或设置 数据行数
        /// </summary>
        public int total { get; set; }
        public int TotalMinerNumber { get; set; }
        public int TotalOnLineNumber { get; set; }
        public int TotalDigNumber { get; set; }
    }
    public class MinersModel
    {
        /// <summary>
        /// 编号
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public int UserID { get; set; }
        /// <summary>
        /// 用户姓名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// Mac地址
        /// </summary>
        public string MacAddress { get; set; }
        /// <summary>
        /// 是否双挖
        /// </summary>
        public bool Second { get; set; }
        /// <summary>
        /// 是否自动矿机名
        /// </summary>
        public bool AutoName { get; set; }
        /// <summary>
        /// 是否自动运行
        /// </summary>
        public bool AutoRun { get; set; }
        /// <summary>
        /// 是否自动升级
        /// </summary>
        public bool AutoUpdate { get; set; }
        /// <summary>
        /// 矿机名称
        /// </summary>
        public string MinerName { get; set; }

        /// <summary>
        /// 状态
        /// 0 不在线
        /// 1 在线
        /// 2 挖矿中
        /// </summary>
        public int State { get; set; }
        /// <summary>
        /// 状态时间
        /// </summary>
        public DateTime StateTime { get; set; }
        /// <summary>
        /// 主挖币种
        /// </summary>
        public string FirstCoin { get; set; }
        /// <summary>
        /// 副挖币种
        /// </summary>
        public string SecondCoin { get; set; }
        /// <summary>
        /// 主挖矿池
        /// </summary>
        public string FirstPool { get; set; }
        /// <summary>
        /// 副挖矿池
        /// </summary>
        public string SecondPool { get; set; }
        /// <summary>
        /// 主挖钱包
        /// </summary>
        public string FirstWallet { get; set; }
        /// <summary>
        /// 副挖钱包
        /// </summary>
        public string SecondWallet { get; set; }
        /// <summary>
        /// 最小风扇
        /// </summary>
        public string MinFan { get; set; }
        /// <summary>
        /// 最大风扇
        /// </summary>
        public string MaxFan { get; set; }

        public string Dcri { get; set; }
        /// <summary>
        /// 高级参数
        /// </summary>
        public string AdvParams { get; set; }
        /// <summary>
        /// 备用矿池
        /// </summary>
        public string BackupPool { get; set; }
        /// <summary>
        /// 最小温度
        /// </summary>
        public string MinTemp { get; set; }
        /// <summary>
        /// 最高温度
        /// </summary>
        public string MaxTemp { get; set; }
        /// <summary>
        /// 3G显卡支持
        /// </summary>
        public string Eres { get; set; }//3G显卡支持
        /// <summary>
        /// 最低算力预警
        /// </summary>
        public string MinSpeed { get; set; }//最低算力预警
        /// <summary>
        /// 高温策略
        /// </summary>
        public HighTempStrategy HighTempStrategy { get; set; }//高温策略
        /// <summary>
        /// 高温报警
        /// </summary>
        public bool HighTempWarn { get; set; }//高温报警
        /// <summary>
        /// 低算力报警
        /// </summary>
        public bool LowStrengthWarn { get; set; }//低算力报警
        /// <summary>
        /// 内核
        /// </summary>
        public CoreType CoreType { get; set; }//内核
    }
    public enum HighTempStrategy
    {
        /// <summary>
        /// 无操作
        /// </summary>
        NoOperation = 0,
        /// <summary>
        /// 降低强度
        /// </summary>
        ReduceStrength = 1,
    }
    public enum CoreType
    {
        Core98 = 1,
        Core114 = 2,
        Core115 = 3,
        Core116 = 4,
    }


}